home *** CD-ROM | disk | FTP | other *** search
- Path: airdmhor.gen.nz!not-for-mail
- From: gumboot@airdmhor.gen.nz (Simon Hosie)
- Newsgroups: comp.lang.c
- Subject: Re: What does the -O option do???!!!
- Date: 31 Jan 1996 15:58:34 +1300
- Organization: Airdmhor
- Message-ID: <4emlsq$odt@airdmhor.gen.nz>
- References: <4ehger$cj9@mark.ucdavis.edu>
- NNTP-Posting-Host: localhost.gen.nz
- X-Newsreader: TIN [version 1.2 PL2]
-
- Ricardo E Espinoza-Ibarra:
-
- > Does anyone know what the -O option in gcc C compiler does? I have tried
- > to compile a program in two different ways: 1) cc -o first first.c, and it
- > worksfine; 2) cc -o first first.c -O, and it runs faster than the other one.
- > I checked to see if it had changed the program code in anyway, and it
- > hadn't. This option stands for "optimizer", but I want to know how the heck
- > it optimizes the program!
-
- Perhaps if the second time you ran it you used "cc -o second first.c -O"
- and then "cmp first second" rather than using "cc -o first fisrt.c -O" and
- then "cmp first first"
-